package org.hoefling.ontology;

/**
 * Risk neutral strategy.
 * @author Kseniya
 */
public class StrategyNeutral implements BiddingStrategy {
    
    private final int bidders;

    public StrategyNeutral(int bidders) {
        this.bidders = bidders;
    }

    @Override
    public int offer(int currPrice, int assets, int itemsToGain) {
        int valuation = (int) ((1 - 1. / (bidders + 1)) * Math.floor((double) assets / itemsToGain));
        int newPrice = currPrice + 1;
        return newPrice < valuation ? newPrice : Integer.MIN_VALUE;
    }
}
